<template>
  <div class="panel">
    <div class="panel-title" :style="{ 'background-color': color }">
      {{ title }}
      <slot name="panel-title"></slot>
    </div>
    <div class="panel-content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: '标题'
    },
    color: {
      type: String,
      default: '#f5f5f5'
    }
  }
}
</script>

<style lang="less" scoped>
@import "../styles/variable.less";

.panel {
  border: 1px solid @border-color2;
  .panel-title {
    background-color: @bg-grey;
    border-bottom: 1px solid @border-color2;
    color: @font-color-grey;
    font-size: 14px;
    padding: 0px 20px;
    line-height: 42px;
  }
  .panel-content {
    background-color: @write;
  }
}
</style>
